package liumengbaio.lolzhangyoubao.Activity.Fragment;

import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.List;

import liumengbaio.lolzhangyoubao.Activity.Activity.HeroDetailsActivity;
import liumengbaio.lolzhangyoubao.Activity.Activity.HeroSearchActivity;
import liumengbaio.lolzhangyoubao.Activity.Adapter.AllHeroAdapter;
import liumengbaio.lolzhangyoubao.Activity.InFo.AllHeroInfo;
import liumengbaio.lolzhangyoubao.Activity.InFo.FreeHeroInfo;
import liumengbaio.lolzhangyoubao.R;

//import liumengbaio.lolzhangyoubao.Activity.Utils.AllHeroUtils;


/**
 * 所有英雄
 * Created by lanouhn on 16/8/23.
 */
public class FragmentHeroAllHero extends Fragment implements OnClickListener {
    private List<AllHeroInfo> allheroinfo;
    private AllHeroAdapter allheroadapter;
    private GridView gridview;
    private TextView tv_type, tv_price, tv_rank;
    private ImageView type_icon,price_icon,rank_icon;
    private PopupWindow mPopupWindow , PricePopupWindow, RankPopupwindow;
    private LinearLayout ll_price,ll_rank,ll_type,ll_herosearch,ll_heroprice,ll_herorank,ll_herotype;
    private Button btn_typeall,btn_myfavorite,btn_support,btn_ap,btn_adc,btn_assassin,btn_man,btn_tank;
    private Button btn_priceall,btn_point1000,btn_point1500,btn_point2000,btn_point2500,btn_point3000,
            btn_point3500,btn_point4000,btn_point4500,btn_money450,btn_money1350,btn_money3150,btn_money4800,
            btn_money6300;
    private Button btn_new,btn_namerank;
    private LinearLayout ll_notfound;





    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_allhero, null);

        return view;

    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        initView(getView());
        initData();
        initEvent();

    }



    private void initView(View view) {
        ll_notfound= (LinearLayout) view.findViewById(R.id.ll_notfound);
        gridview = (GridView) view.findViewById(R.id.allherogridview);
        tv_type= (TextView) view.findViewById(R.id.tv_type);
        tv_price= (TextView) view.findViewById(R.id.tv_price);
        tv_rank= (TextView) view.findViewById(R.id.tv_rank);
        type_icon= (ImageView) view.findViewById(R.id.type_icon);
        price_icon= (ImageView) view.findViewById(R.id.price_icon);
        rank_icon= (ImageView) view.findViewById(R.id.rank_icon);
        ll_herotype= (LinearLayout) view.findViewById(R.id.ll_herotype);
        ll_heroprice= (LinearLayout) view.findViewById(R.id.ll_heroprice);
        ll_herorank= (LinearLayout) view.findViewById(R.id.ll_herorank);
        ll_type= (LinearLayout) view.findViewById(R.id.ll_type);
        ll_price= (LinearLayout) view.findViewById(R.id.ll_price);
        ll_rank= (LinearLayout) view.findViewById(R.id.ll_rank);
        ll_herosearch= (LinearLayout) view.findViewById(R.id.ll_search);
        ll_herosearch.setOnClickListener(this);
        ll_herotype.setOnClickListener(this);
        ll_heroprice.setOnClickListener(this);
        ll_herorank.setOnClickListener(this);

    }

    private void initData() {
        allheroinfo=new ArrayList<>();
        allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroUtils.getAllHerosList(getActivity());
        allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
        gridview.setAdapter(allheroadapter);
    }






    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.ll_herotype:

                if (mPopupWindow == null) {

                    if (PricePopupWindow != null) {
                        PricePopupWindow.dismiss();
                        PricePopupWindow = null;
                    } else if (RankPopupwindow != null) {
                        RankPopupwindow.dismiss();
                        RankPopupwindow = null;
                    }
                    initTabSelect(3);

                    final View view = getLayoutInflater(null).inflate(R.layout.allhero_typepopupwindow, null);
                    btn_typeall= (Button) view.findViewById(R.id.btn_typeall);
                    btn_myfavorite= (Button) view.findViewById(R.id.btn_myfavorite);
                    btn_support= (Button) view.findViewById(R.id.btn_support);
                    btn_ap= (Button) view.findViewById(R.id.btn_ap);
                    btn_adc= (Button) view.findViewById(R.id.btn_adc);
                    btn_assassin= (Button) view.findViewById(R.id.btn_assassin);
                    btn_man= (Button) view.findViewById(R.id.btn_man);
                    btn_tank= (Button) view.findViewById(R.id.btn_tank);
                    mPopupWindow = new PopupWindow(view, ViewGroup.LayoutParams.MATCH_PARENT
                            , ViewGroup.LayoutParams.MATCH_PARENT, false);
                    mPopupWindow.showAsDropDown(ll_herotype);
                    ll_herotype.setBackgroundColor(Color.parseColor("#DDDDDD"));
                    btn_typeall.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_typeall.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_typeall.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_myfavorite.setTextColor(Color.parseColor("#626468"));
                            btn_myfavorite.setBackgroundResource(R.drawable.filter_item_b);
                            btn_support.setTextColor(Color.parseColor("#626468"));
                            btn_support.setBackgroundResource(R.drawable.filter_item_b);
                            btn_ap.setTextColor(Color.parseColor("#626468"));
                            btn_ap.setBackgroundResource(R.drawable.filter_item_b);
                            btn_adc.setTextColor(Color.parseColor("#626468"));
                            btn_adc.setBackgroundResource(R.drawable.filter_item_b);
                            btn_assassin.setTextColor(Color.parseColor("#626468"));
                            btn_assassin.setBackgroundResource(R.drawable.filter_item_b);
                            btn_man.setTextColor(Color.parseColor("#626468"));
                            btn_man.setBackgroundResource(R.drawable.filter_item_b);
                            btn_tank.setTextColor(Color.parseColor("#626468"));
                            btn_tank.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroUtils.getAllHerosList(getActivity());
                            allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                            gridview.setAdapter(allheroadapter);
                            mPopupWindow.dismiss();
                            mPopupWindow =null;
                            tv_type.setText("类型");
                            initTabSelect(3);
                        }
                    });
                    btn_myfavorite.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_myfavorite.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_myfavorite.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_adc.setTextColor(Color.parseColor("#626468"));
                            btn_adc.setBackgroundResource(R.drawable.filter_item_b);
                            btn_typeall.setTextColor(Color.parseColor("#626468"));
                            btn_typeall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_support.setTextColor(Color.parseColor("#626468"));
                            btn_support.setBackgroundResource(R.drawable.filter_item_b);
                            btn_ap.setTextColor(Color.parseColor("#626468"));
                            btn_ap.setBackgroundResource(R.drawable.filter_item_b);
                            btn_assassin.setTextColor(Color.parseColor("#626468"));
                            btn_assassin.setBackgroundResource(R.drawable.filter_item_b);
                            btn_man.setTextColor(Color.parseColor("#626468"));
                            btn_man.setBackgroundResource(R.drawable.filter_item_b);
                            btn_tank.setTextColor(Color.parseColor("#626468"));
                            btn_tank.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroMyFavoriteUtils.getAllHerosList(getActivity());
                            allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                            gridview.setAdapter(allheroadapter);
                            mPopupWindow.dismiss();
                            mPopupWindow =null;
                            tv_type.setText("收藏");
                            initTabSelect(3);
                        }
                    });
                    btn_support.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_support.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_support.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_myfavorite.setTextColor(Color.parseColor("#626468"));
                            btn_myfavorite.setBackgroundResource(R.drawable.filter_item_b);
                            btn_typeall.setTextColor(Color.parseColor("#626468"));
                            btn_typeall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_ap.setTextColor(Color.parseColor("#626468"));
                            btn_ap.setBackgroundResource(R.drawable.filter_item_b);
                            btn_adc.setTextColor(Color.parseColor("#626468"));
                            btn_adc.setBackgroundResource(R.drawable.filter_item_b);
                            btn_assassin.setTextColor(Color.parseColor("#626468"));
                            btn_assassin.setBackgroundResource(R.drawable.filter_item_b);
                            btn_man.setTextColor(Color.parseColor("#626468"));
                            btn_man.setBackgroundResource(R.drawable.filter_item_b);
                            btn_tank.setTextColor(Color.parseColor("#626468"));
                            btn_tank.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_price.getText().equals("价格")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_price.getText().equals("1000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport1000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("1500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport1500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("2000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport2000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("2500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport2500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport3000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport3500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport4000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport4500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("450金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport450(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("1350金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport1350(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3150金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport3150(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4800金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport4800(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("6300金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport6300(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            mPopupWindow.dismiss();
                            mPopupWindow =null;
                            tv_type.setText("辅助");
                            initTabSelect(3);

                        }
                    });
                    btn_ap.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_ap.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_ap.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_myfavorite.setTextColor(Color.parseColor("#626468"));
                            btn_myfavorite.setBackgroundResource(R.drawable.filter_item_b);
                            btn_typeall.setTextColor(Color.parseColor("#626468"));
                            btn_typeall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_support.setTextColor(Color.parseColor("#626468"));
                            btn_support.setBackgroundResource(R.drawable.filter_item_b);
                            btn_adc.setTextColor(Color.parseColor("#626468"));
                            btn_adc.setBackgroundResource(R.drawable.filter_item_b);
                            btn_assassin.setTextColor(Color.parseColor("#626468"));
                            btn_assassin.setBackgroundResource(R.drawable.filter_item_b);
                            btn_man.setTextColor(Color.parseColor("#626468"));
                            btn_man.setBackgroundResource(R.drawable.filter_item_b);
                            btn_tank.setTextColor(Color.parseColor("#626468"));
                            btn_tank.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_price.getText().equals("价格")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_price.getText().equals("1000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp1000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("1500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp1500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("2000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp2000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("2500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp2500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp3000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp3500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp4000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp4500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("450金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp450(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("1350金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp1350(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3150金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp3150(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4800金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp4800(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("6300金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp6300(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }

                            mPopupWindow.dismiss();
                            mPopupWindow =null;
                            tv_type.setText("法师");
                            initTabSelect(3);
                        }
                    });
                    btn_adc.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_adc.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_adc.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_myfavorite.setTextColor(Color.parseColor("#626468"));
                            btn_myfavorite.setBackgroundResource(R.drawable.filter_item_b);
                            btn_typeall.setTextColor(Color.parseColor("#626468"));
                            btn_typeall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_support.setTextColor(Color.parseColor("#626468"));
                            btn_support.setBackgroundResource(R.drawable.filter_item_b);
                            btn_ap.setTextColor(Color.parseColor("#626468"));
                            btn_ap.setBackgroundResource(R.drawable.filter_item_b);
                            btn_assassin.setTextColor(Color.parseColor("#626468"));
                            btn_assassin.setBackgroundResource(R.drawable.filter_item_b);
                            btn_man.setTextColor(Color.parseColor("#626468"));
                            btn_man.setBackgroundResource(R.drawable.filter_item_b);
                            btn_tank.setTextColor(Color.parseColor("#626468"));
                            btn_tank.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_price.getText().equals("价格")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_price.getText().equals("1000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc1000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("1500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc1500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("2000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc2000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("2500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc2500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc3000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc3500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc4000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc4500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("450金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc450(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("1350金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc1350(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3150金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc3150(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4800金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc4800(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("6300金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc6300(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            mPopupWindow.dismiss();
                            mPopupWindow =null;
                            tv_type.setText("射手");
                            initTabSelect(3);
                        }
                    });
                    btn_assassin.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_assassin.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_assassin.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_myfavorite.setTextColor(Color.parseColor("#626468"));
                            btn_myfavorite.setBackgroundResource(R.drawable.filter_item_b);
                            btn_typeall.setTextColor(Color.parseColor("#626468"));
                            btn_typeall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_support.setTextColor(Color.parseColor("#626468"));
                            btn_support.setBackgroundResource(R.drawable.filter_item_b);
                            btn_ap.setTextColor(Color.parseColor("#626468"));
                            btn_ap.setBackgroundResource(R.drawable.filter_item_b);
                            btn_adc.setTextColor(Color.parseColor("#626468"));
                            btn_adc.setBackgroundResource(R.drawable.filter_item_b);
                            btn_man.setTextColor(Color.parseColor("#626468"));
                            btn_man.setBackgroundResource(R.drawable.filter_item_b);
                            btn_tank.setTextColor(Color.parseColor("#626468"));
                            btn_tank.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_price.getText().equals("价格")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_price.getText().equals("1000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin1000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("1500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin1500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("2000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin2000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("2500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin2500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin3000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin3500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin4000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin4500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("450金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin450(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("1350金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin1350(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3150金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin3150(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4800金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin4800(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("6300金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin6300(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }

                            mPopupWindow.dismiss();
                            mPopupWindow =null;
                            tv_type.setText("刺客");
                            initTabSelect(3);
                        }
                    });

                    btn_man.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_man.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_man.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_myfavorite.setTextColor(Color.parseColor("#626468"));
                            btn_myfavorite.setBackgroundResource(R.drawable.filter_item_b);
                            btn_typeall.setTextColor(Color.parseColor("#626468"));
                            btn_typeall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_support.setTextColor(Color.parseColor("#626468"));
                            btn_support.setBackgroundResource(R.drawable.filter_item_b);
                            btn_ap.setTextColor(Color.parseColor("#626468"));
                            btn_ap.setBackgroundResource(R.drawable.filter_item_b);
                            btn_adc.setTextColor(Color.parseColor("#626468"));
                            btn_adc.setBackgroundResource(R.drawable.filter_item_b);
                            btn_assassin.setTextColor(Color.parseColor("#626468"));
                            btn_assassin.setBackgroundResource(R.drawable.filter_item_b);
                            btn_tank.setTextColor(Color.parseColor("#626468"));
                            btn_tank.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_price.getText().equals("价格")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_price.getText().equals("1000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan1000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("1500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan1500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("2000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan2000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("2500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan2500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan3000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan3500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan4000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan4500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("450金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan450(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("1350金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan1350(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3150金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan3150(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4800金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan4800(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("6300金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan6300(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            mPopupWindow.dismiss();
                            mPopupWindow =null;
                            tv_type.setText("战士");
                            initTabSelect(3);
                        }
                    });
                    btn_tank.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_tank.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_tank.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_myfavorite.setTextColor(Color.parseColor("#626468"));
                            btn_myfavorite.setBackgroundResource(R.drawable.filter_item_b);
                            btn_typeall.setTextColor(Color.parseColor("#626468"));
                            btn_typeall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_support.setTextColor(Color.parseColor("#626468"));
                            btn_support.setBackgroundResource(R.drawable.filter_item_b);
                            btn_ap.setTextColor(Color.parseColor("#626468"));
                            btn_ap.setBackgroundResource(R.drawable.filter_item_b);
                            btn_adc.setTextColor(Color.parseColor("#626468"));
                            btn_adc.setBackgroundResource(R.drawable.filter_item_b);
                            btn_assassin.setTextColor(Color.parseColor("#626468"));
                            btn_assassin.setBackgroundResource(R.drawable.filter_item_b);
                            btn_man.setTextColor(Color.parseColor("#626468"));
                            btn_man.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_price.getText().equals("价格")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_price.getText().equals("1000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank1000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("1500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank1500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("2000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank2000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("2500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank2500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank3000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank3500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4000点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank4000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4500点")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank4500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("450金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank450(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("1350金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank1350(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("3150金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank3150(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("4800金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank4800(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_price.getText().equals("6300金")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank6300(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            mPopupWindow.dismiss();
                            mPopupWindow =null;
                            tv_type.setText("坦克");
                            initTabSelect(3);
                        }
                    });

                    view.setOnTouchListener(new View.OnTouchListener() {
                        @Override
                        public boolean onTouch(View v, MotionEvent event) {
                            if (mPopupWindow != null && mPopupWindow.isShowing()) {

                                mPopupWindow.dismiss();
                                mPopupWindow = null;
                                initTabSelect(3);
                            }
                            return false;
                        }
                    });

                    initTabSelect(0);
                } else {
                    if (mPopupWindow.isShowing()) {
                        mPopupWindow.dismiss();
                        mPopupWindow = null;
                        initTabSelect(3);
                    }
                }
                break;
            case R.id.ll_heroprice:


                if (PricePopupWindow == null) {

                    if (mPopupWindow != null) {
                        mPopupWindow.dismiss();
                        mPopupWindow = null;
                    } else if (RankPopupwindow != null) {
                        RankPopupwindow.dismiss();
                        RankPopupwindow = null;
                    }
                    initTabSelect(3);


                    final View view = getLayoutInflater(null).inflate(R.layout.allhero_pricepopupwindow, null);
                    btn_priceall= (Button) view.findViewById(R.id.btn_priceall);
                    btn_point1000= (Button) view.findViewById(R.id.btn_point1000);
                    btn_point1500= (Button) view.findViewById(R.id.btn_point1500);
                    btn_point2000= (Button) view.findViewById(R.id.btn_point2000);
                    btn_point2500= (Button) view.findViewById(R.id.btn_point2500);
                    btn_point3000= (Button) view.findViewById(R.id.btn_point3000);
                    btn_point3500= (Button) view.findViewById(R.id.btn_point3500);
                    btn_point4000= (Button) view.findViewById(R.id.btn_point4000);
                    btn_point4500= (Button) view.findViewById(R.id.btn_point4500);
                    btn_money450= (Button) view.findViewById(R.id.btn_money450);
                    btn_money1350= (Button) view.findViewById(R.id.btn_money1350);
                    btn_money3150= (Button) view.findViewById(R.id.btn_money3150);
                    btn_money4800= (Button) view.findViewById(R.id.btn_money4800);
                    btn_money6300= (Button) view.findViewById(R.id.btn_money6300);
                    PricePopupWindow = new PopupWindow(view, ViewGroup.LayoutParams.MATCH_PARENT
                            , ViewGroup.LayoutParams.MATCH_PARENT, false);
                    PricePopupWindow.showAsDropDown(ll_heroprice);
                    ll_heroprice.setBackgroundColor(Color.parseColor("#DDDDDD"));
                    btn_priceall.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_priceall.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_priceall.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_point1000.setTextColor(Color.parseColor("#626468"));
                            btn_point1000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1500.setTextColor(Color.parseColor("#626468"));
                            btn_point1500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2000.setTextColor(Color.parseColor("#626468"));
                            btn_point2000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2500.setTextColor(Color.parseColor("#626468"));
                            btn_point2500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3000.setTextColor(Color.parseColor("#626468"));
                            btn_point3000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3500.setTextColor(Color.parseColor("#626468"));
                            btn_point3500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4000.setTextColor(Color.parseColor("#626468"));
                            btn_point4000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4500.setTextColor(Color.parseColor("#626468"));
                            btn_point4500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money450.setTextColor(Color.parseColor("#626468"));
                            btn_money450.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money1350.setTextColor(Color.parseColor("#626468"));
                            btn_money1350.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money3150.setTextColor(Color.parseColor("#626468"));
                            btn_money3150.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money4800.setTextColor(Color.parseColor("#626468"));
                            btn_money4800.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money6300.setTextColor(Color.parseColor("#626468"));
                            btn_money6300.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroUtils.getAllHerosList(getActivity());
                            allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                            gridview.setAdapter(allheroadapter);
                            PricePopupWindow.dismiss();
                            PricePopupWindow =null;
                            tv_price.setText("价格");
                            initTabSelect(3);
                        }
                    });
                    btn_point1000.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_point1000.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_point1000.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_priceall.setTextColor(Color.parseColor("#626468"));
                            btn_priceall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1500.setTextColor(Color.parseColor("#626468"));
                            btn_point1500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2000.setTextColor(Color.parseColor("#626468"));
                            btn_point2000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2500.setTextColor(Color.parseColor("#626468"));
                            btn_point2500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3000.setTextColor(Color.parseColor("#626468"));
                            btn_point3000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3500.setTextColor(Color.parseColor("#626468"));
                            btn_point3500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4000.setTextColor(Color.parseColor("#626468"));
                            btn_point4000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4500.setTextColor(Color.parseColor("#626468"));
                            btn_point4500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money450.setTextColor(Color.parseColor("#626468"));
                            btn_money450.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money1350.setTextColor(Color.parseColor("#626468"));
                            btn_money1350.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money3150.setTextColor(Color.parseColor("#626468"));
                            btn_money3150.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money4800.setTextColor(Color.parseColor("#626468"));
                            btn_money4800.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money6300.setTextColor(Color.parseColor("#626468"));
                            btn_money6300.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_type.getText().equals("类型")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroPoint1000Utils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_type.getText().equals("辅助")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport1000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            } else if(tv_type.getText().equals("法师")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp1000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            else if(tv_type.getText().equals("射手")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc1000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("刺客")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin1000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("战士")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan1000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("坦克")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank1000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            PricePopupWindow.dismiss();
                            PricePopupWindow =null;
                            tv_price.setText("1000点");
                            initTabSelect(3);
                        }
                    });
                    btn_point1500.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_point1500.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_point1500.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_priceall.setTextColor(Color.parseColor("#626468"));
                            btn_priceall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1000.setTextColor(Color.parseColor("#626468"));
                            btn_point1000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2000.setTextColor(Color.parseColor("#626468"));
                            btn_point2000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2500.setTextColor(Color.parseColor("#626468"));
                            btn_point2500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3000.setTextColor(Color.parseColor("#626468"));
                            btn_point3000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3500.setTextColor(Color.parseColor("#626468"));
                            btn_point3500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4000.setTextColor(Color.parseColor("#626468"));
                            btn_point4000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4500.setTextColor(Color.parseColor("#626468"));
                            btn_point4500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money450.setTextColor(Color.parseColor("#626468"));
                            btn_money450.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money1350.setTextColor(Color.parseColor("#626468"));
                            btn_money1350.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money3150.setTextColor(Color.parseColor("#626468"));
                            btn_money3150.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money4800.setTextColor(Color.parseColor("#626468"));
                            btn_money4800.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money6300.setTextColor(Color.parseColor("#626468"));
                            btn_money6300.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_type.getText().equals("类型")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroPoint1500Utils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_type.getText().equals("辅助")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport1500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            } else if(tv_type.getText().equals("法师")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp1500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            else if(tv_type.getText().equals("射手")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc1500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("刺客")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin1500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("战士")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan1500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("坦克")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank1500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            PricePopupWindow.dismiss();
                            PricePopupWindow =null;
                            tv_price.setText("1500点");
                            initTabSelect(3);
                        }
                    });
                    btn_point2000.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_point2000.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_point2000.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_priceall.setTextColor(Color.parseColor("#626468"));
                            btn_priceall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1000.setTextColor(Color.parseColor("#626468"));
                            btn_point1000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1500.setTextColor(Color.parseColor("#626468"));
                            btn_point1500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2500.setTextColor(Color.parseColor("#626468"));
                            btn_point2500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3000.setTextColor(Color.parseColor("#626468"));
                            btn_point3000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3500.setTextColor(Color.parseColor("#626468"));
                            btn_point3500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4000.setTextColor(Color.parseColor("#626468"));
                            btn_point4000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4500.setTextColor(Color.parseColor("#626468"));
                            btn_point4500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money450.setTextColor(Color.parseColor("#626468"));
                            btn_money450.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money1350.setTextColor(Color.parseColor("#626468"));
                            btn_money1350.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money3150.setTextColor(Color.parseColor("#626468"));
                            btn_money3150.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money4800.setTextColor(Color.parseColor("#626468"));
                            btn_money4800.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money6300.setTextColor(Color.parseColor("#626468"));
                            btn_money6300.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_type.getText().equals("类型")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroPoint2000Utils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_type.getText().equals("辅助")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport2000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            } else if(tv_type.getText().equals("法师")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp2000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            else if(tv_type.getText().equals("射手")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc2000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("刺客")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin2000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("战士")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan2000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("坦克")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank2000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            PricePopupWindow.dismiss();
                            PricePopupWindow =null;
                            tv_price.setText("2000点");
                            initTabSelect(3);
                        }
                    });
                    btn_point2500.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_point2500.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_point2500.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_priceall.setTextColor(Color.parseColor("#626468"));
                            btn_priceall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1000.setTextColor(Color.parseColor("#626468"));
                            btn_point1000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1500.setTextColor(Color.parseColor("#626468"));
                            btn_point1500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2000.setTextColor(Color.parseColor("#626468"));
                            btn_point2000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3000.setTextColor(Color.parseColor("#626468"));
                            btn_point3000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3500.setTextColor(Color.parseColor("#626468"));
                            btn_point3500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4000.setTextColor(Color.parseColor("#626468"));
                            btn_point4000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4500.setTextColor(Color.parseColor("#626468"));
                            btn_point4500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money450.setTextColor(Color.parseColor("#626468"));
                            btn_money450.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money1350.setTextColor(Color.parseColor("#626468"));
                            btn_money1350.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money3150.setTextColor(Color.parseColor("#626468"));
                            btn_money3150.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money4800.setTextColor(Color.parseColor("#626468"));
                            btn_money4800.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money6300.setTextColor(Color.parseColor("#626468"));
                            btn_money6300.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_type.getText().equals("类型")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroPoint2500Utils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_type.getText().equals("辅助")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport2500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            } else if(tv_type.getText().equals("法师")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp2500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            else if(tv_type.getText().equals("射手")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc2500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("刺客")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin2500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("战士")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan2500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("坦克")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank2500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            PricePopupWindow.dismiss();
                            PricePopupWindow =null;
                            tv_price.setText("2500点");
                            initTabSelect(3);
                        }
                    });
                    btn_point3000.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_point3000.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_point3000.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_priceall.setTextColor(Color.parseColor("#626468"));
                            btn_priceall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1000.setTextColor(Color.parseColor("#626468"));
                            btn_point1000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1500.setTextColor(Color.parseColor("#626468"));
                            btn_point1500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2000.setTextColor(Color.parseColor("#626468"));
                            btn_point2000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2500.setTextColor(Color.parseColor("#626468"));
                            btn_point2500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3500.setTextColor(Color.parseColor("#626468"));
                            btn_point3500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4000.setTextColor(Color.parseColor("#626468"));
                            btn_point4000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4500.setTextColor(Color.parseColor("#626468"));
                            btn_point4500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money450.setTextColor(Color.parseColor("#626468"));
                            btn_money450.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money1350.setTextColor(Color.parseColor("#626468"));
                            btn_money1350.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money3150.setTextColor(Color.parseColor("#626468"));
                            btn_money3150.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money4800.setTextColor(Color.parseColor("#626468"));
                            btn_money4800.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money6300.setTextColor(Color.parseColor("#626468"));
                            btn_money6300.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_type.getText().equals("类型")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroPoint3000Utils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_type.getText().equals("辅助")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport3000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            } else if(tv_type.getText().equals("法师")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp3000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            else if(tv_type.getText().equals("射手")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc3000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("刺客")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin3000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("战士")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan3000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("坦克")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank3000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            PricePopupWindow.dismiss();
                            PricePopupWindow =null;
                            tv_price.setText("3000点");
                            initTabSelect(3);
                        }
                    });
                    btn_point3500.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_point3500.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_point3500.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_priceall.setTextColor(Color.parseColor("#626468"));
                            btn_priceall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1000.setTextColor(Color.parseColor("#626468"));
                            btn_point1000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1500.setTextColor(Color.parseColor("#626468"));
                            btn_point1500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2000.setTextColor(Color.parseColor("#626468"));
                            btn_point2000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2500.setTextColor(Color.parseColor("#626468"));
                            btn_point2500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3000.setTextColor(Color.parseColor("#626468"));
                            btn_point3000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4000.setTextColor(Color.parseColor("#626468"));
                            btn_point4000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4500.setTextColor(Color.parseColor("#626468"));
                            btn_point4500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money450.setTextColor(Color.parseColor("#626468"));
                            btn_money450.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money1350.setTextColor(Color.parseColor("#626468"));
                            btn_money1350.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money3150.setTextColor(Color.parseColor("#626468"));
                            btn_money3150.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money4800.setTextColor(Color.parseColor("#626468"));
                            btn_money4800.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money6300.setTextColor(Color.parseColor("#626468"));
                            btn_money6300.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_type.getText().equals("类型")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroPoint3500Utils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_type.getText().equals("辅助")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport3500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            } else if(tv_type.getText().equals("法师")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp3500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            else if(tv_type.getText().equals("射手")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc3500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("刺客")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin3500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("战士")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan3500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("坦克")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank3500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            PricePopupWindow.dismiss();
                            PricePopupWindow =null;
                            tv_price.setText("3500点");
                            initTabSelect(3);
                        }
                    });
                    btn_point4000.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_point4000.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_point4000.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_priceall.setTextColor(Color.parseColor("#626468"));
                            btn_priceall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1000.setTextColor(Color.parseColor("#626468"));
                            btn_point1000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1500.setTextColor(Color.parseColor("#626468"));
                            btn_point1500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2000.setTextColor(Color.parseColor("#626468"));
                            btn_point2000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2500.setTextColor(Color.parseColor("#626468"));
                            btn_point2500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3000.setTextColor(Color.parseColor("#626468"));
                            btn_point3000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3500.setTextColor(Color.parseColor("#626468"));
                            btn_point3500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4500.setTextColor(Color.parseColor("#626468"));
                            btn_point4500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money450.setTextColor(Color.parseColor("#626468"));
                            btn_money450.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money1350.setTextColor(Color.parseColor("#626468"));
                            btn_money1350.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money3150.setTextColor(Color.parseColor("#626468"));
                            btn_money3150.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money4800.setTextColor(Color.parseColor("#626468"));
                            btn_money4800.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money6300.setTextColor(Color.parseColor("#626468"));
                            btn_money6300.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_type.getText().equals("类型")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroPoint4000Utils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_type.getText().equals("辅助")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport4000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            } else if(tv_type.getText().equals("法师")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp4000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            else if(tv_type.getText().equals("射手")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc4000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("刺客")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin4000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("战士")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan4000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("坦克")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank4000(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            PricePopupWindow.dismiss();
                            PricePopupWindow =null;
                            tv_price.setText("4000点");
                            initTabSelect(3);
                        }
                    });
                    btn_point4500.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_point4500.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_point4500.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_priceall.setTextColor(Color.parseColor("#626468"));
                            btn_priceall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1000.setTextColor(Color.parseColor("#626468"));
                            btn_point1000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1500.setTextColor(Color.parseColor("#626468"));
                            btn_point1500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2000.setTextColor(Color.parseColor("#626468"));
                            btn_point2000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2500.setTextColor(Color.parseColor("#626468"));
                            btn_point2500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3000.setTextColor(Color.parseColor("#626468"));
                            btn_point3000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3500.setTextColor(Color.parseColor("#626468"));
                            btn_point3500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4000.setTextColor(Color.parseColor("#626468"));
                            btn_point4000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money450.setTextColor(Color.parseColor("#626468"));
                            btn_money450.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money1350.setTextColor(Color.parseColor("#626468"));
                            btn_money1350.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money3150.setTextColor(Color.parseColor("#626468"));
                            btn_money3150.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money4800.setTextColor(Color.parseColor("#626468"));
                            btn_money4800.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money6300.setTextColor(Color.parseColor("#626468"));
                            btn_money6300.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_type.getText().equals("类型")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroPoint4500Utils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_type.getText().equals("辅助")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport4500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            } else if(tv_type.getText().equals("法师")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp4500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            else if(tv_type.getText().equals("射手")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc4500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("刺客")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin4500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("战士")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan4500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("坦克")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank4500(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            PricePopupWindow.dismiss();
                            PricePopupWindow =null;
                            tv_price.setText("4500点");
                            initTabSelect(3);
                        }
                    });
                    btn_money450.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_money450.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_money450.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_priceall.setTextColor(Color.parseColor("#626468"));
                            btn_priceall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1000.setTextColor(Color.parseColor("#626468"));
                            btn_point1000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1500.setTextColor(Color.parseColor("#626468"));
                            btn_point1500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2000.setTextColor(Color.parseColor("#626468"));
                            btn_point2000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2500.setTextColor(Color.parseColor("#626468"));
                            btn_point2500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3000.setTextColor(Color.parseColor("#626468"));
                            btn_point3000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3500.setTextColor(Color.parseColor("#626468"));
                            btn_point3500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4000.setTextColor(Color.parseColor("#626468"));
                            btn_point4000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4500.setTextColor(Color.parseColor("#626468"));
                            btn_point4500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money1350.setTextColor(Color.parseColor("#626468"));
                            btn_money1350.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money3150.setTextColor(Color.parseColor("#626468"));
                            btn_money3150.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money4800.setTextColor(Color.parseColor("#626468"));
                            btn_money4800.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money6300.setTextColor(Color.parseColor("#626468"));
                            btn_money6300.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_type.getText().equals("类型")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroMoney450Utils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_type.getText().equals("辅助")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport450(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            } else if(tv_type.getText().equals("法师")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp450(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            else if(tv_type.getText().equals("射手")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc450(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("刺客")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin450(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("战士")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan450(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("坦克")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank450(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            PricePopupWindow.dismiss();
                            PricePopupWindow =null;
                            tv_price.setText("450金");
                            initTabSelect(3);
                        }
                    });
                    btn_money1350.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_money1350.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_money1350.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_priceall.setTextColor(Color.parseColor("#626468"));
                            btn_priceall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1000.setTextColor(Color.parseColor("#626468"));
                            btn_point1000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1500.setTextColor(Color.parseColor("#626468"));
                            btn_point1500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2000.setTextColor(Color.parseColor("#626468"));
                            btn_point2000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2500.setTextColor(Color.parseColor("#626468"));
                            btn_point2500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3000.setTextColor(Color.parseColor("#626468"));
                            btn_point3000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3500.setTextColor(Color.parseColor("#626468"));
                            btn_point3500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4000.setTextColor(Color.parseColor("#626468"));
                            btn_point4000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4500.setTextColor(Color.parseColor("#626468"));
                            btn_point4500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money450.setTextColor(Color.parseColor("#626468"));
                            btn_money450.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money3150.setTextColor(Color.parseColor("#626468"));
                            btn_money3150.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money4800.setTextColor(Color.parseColor("#626468"));
                            btn_money4800.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money6300.setTextColor(Color.parseColor("#626468"));
                            btn_money6300.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_type.getText().equals("类型")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroMoney1350Utils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_type.getText().equals("辅助")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport1350(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            } else if(tv_type.getText().equals("法师")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp1350(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            else if(tv_type.getText().equals("射手")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc1350(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("刺客")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin1350(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("战士")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan1350(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("坦克")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank1350(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            PricePopupWindow.dismiss();
                            PricePopupWindow =null;
                            tv_price.setText("1350金");
                            initTabSelect(3);
                        }
                    });
                    btn_money3150.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_money3150.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_money3150.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_priceall.setTextColor(Color.parseColor("#626468"));
                            btn_priceall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1000.setTextColor(Color.parseColor("#626468"));
                            btn_point1000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1500.setTextColor(Color.parseColor("#626468"));
                            btn_point1500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2000.setTextColor(Color.parseColor("#626468"));
                            btn_point2000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2500.setTextColor(Color.parseColor("#626468"));
                            btn_point2500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3000.setTextColor(Color.parseColor("#626468"));
                            btn_point3000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3500.setTextColor(Color.parseColor("#626468"));
                            btn_point3500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4000.setTextColor(Color.parseColor("#626468"));
                            btn_point4000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4500.setTextColor(Color.parseColor("#626468"));
                            btn_point4500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money450.setTextColor(Color.parseColor("#626468"));
                            btn_money450.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money1350.setTextColor(Color.parseColor("#626468"));
                            btn_money1350.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money4800.setTextColor(Color.parseColor("#626468"));
                            btn_money4800.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money6300.setTextColor(Color.parseColor("#626468"));
                            btn_money6300.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_type.getText().equals("类型")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroMoney3150Utils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_type.getText().equals("辅助")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport3150(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            } else if(tv_type.getText().equals("法师")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp3150(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            else if(tv_type.getText().equals("射手")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc3150(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("刺客")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin3150(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("战士")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan3150(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("坦克")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank3150(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            PricePopupWindow.dismiss();
                            PricePopupWindow =null;
                            tv_price.setText("3150金");
                            initTabSelect(3);
                        }
                    });
                    btn_money4800.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_money4800.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_money4800.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_priceall.setTextColor(Color.parseColor("#626468"));
                            btn_priceall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1000.setTextColor(Color.parseColor("#626468"));
                            btn_point1000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1500.setTextColor(Color.parseColor("#626468"));
                            btn_point1500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2000.setTextColor(Color.parseColor("#626468"));
                            btn_point2000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2500.setTextColor(Color.parseColor("#626468"));
                            btn_point2500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3000.setTextColor(Color.parseColor("#626468"));
                            btn_point3000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3500.setTextColor(Color.parseColor("#626468"));
                            btn_point3500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4000.setTextColor(Color.parseColor("#626468"));
                            btn_point4000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4500.setTextColor(Color.parseColor("#626468"));
                            btn_point4500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money450.setTextColor(Color.parseColor("#626468"));
                            btn_money450.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money1350.setTextColor(Color.parseColor("#626468"));
                            btn_money1350.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money3150.setTextColor(Color.parseColor("#626468"));
                            btn_money3150.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money6300.setTextColor(Color.parseColor("#626468"));
                            btn_money6300.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_type.getText().equals("类型")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroMoney4800Utils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_type.getText().equals("辅助")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport4800(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            } else if(tv_type.getText().equals("法师")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp4800(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            else if(tv_type.getText().equals("射手")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc4800(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("刺客")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin4800(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("战士")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan4800(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("坦克")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank4800(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            PricePopupWindow.dismiss();
                            PricePopupWindow =null;
                            tv_price.setText("4800金");
                            initTabSelect(3);
                        }
                    });
                    btn_money6300.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_money6300.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_money6300.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_priceall.setTextColor(Color.parseColor("#626468"));
                            btn_priceall.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1000.setTextColor(Color.parseColor("#626468"));
                            btn_point1000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point1500.setTextColor(Color.parseColor("#626468"));
                            btn_point1500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2000.setTextColor(Color.parseColor("#626468"));
                            btn_point2000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point2500.setTextColor(Color.parseColor("#626468"));
                            btn_point2500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3000.setTextColor(Color.parseColor("#626468"));
                            btn_point3000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point3500.setTextColor(Color.parseColor("#626468"));
                            btn_point3500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4000.setTextColor(Color.parseColor("#626468"));
                            btn_point4000.setBackgroundResource(R.drawable.filter_item_b);
                            btn_point4500.setTextColor(Color.parseColor("#626468"));
                            btn_point4500.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money450.setTextColor(Color.parseColor("#626468"));
                            btn_money450.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money1350.setTextColor(Color.parseColor("#626468"));
                            btn_money1350.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money3150.setTextColor(Color.parseColor("#626468"));
                            btn_money3150.setBackgroundResource(R.drawable.filter_item_b);
                            btn_money4800.setTextColor(Color.parseColor("#626468"));
                            btn_money4800.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            if (tv_type.getText().equals("类型")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroMoney6300Utils.getAllHerosList(getActivity());
                                allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                gridview.setAdapter(allheroadapter);
                            }else if(tv_type.getText().equals("辅助")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroSupportUtils.getAllHerosSupport6300(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            } else if(tv_type.getText().equals("法师")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroApUtils.getAllHerosAp6300(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            else if(tv_type.getText().equals("射手")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAdcUtils.getAllHerosAdc6300(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("刺客")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroAssassinUtils.getAllHerosAssassin6300(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("战士")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroManUtils.getAllHerosMan6300(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }else if(tv_type.getText().equals("坦克")){
                                allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroTankUtils.getAllHerosTank6300(getActivity());
                                if (allheroinfo.size()>0){
                                    allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                                    gridview.setAdapter(allheroadapter);
                                }else{
                                    gridview.setVisibility(View.GONE);
                                    ll_notfound.setVisibility(View.VISIBLE);
                                }

                            }
                            PricePopupWindow.dismiss();
                            PricePopupWindow =null;
                            tv_price.setText("6300金");
                            initTabSelect(3);
                        }
                    });



                    view.setOnTouchListener(new View.OnTouchListener() {
                        @Override
                        public boolean onTouch(View v, MotionEvent event) {
                            if (PricePopupWindow != null && PricePopupWindow.isShowing()) {

                                PricePopupWindow.dismiss();
                                PricePopupWindow = null;
                                initTabSelect(3);
                            }
                            return false;
                        }
                    });

                    initTabSelect(1);
                } else {
                    if (PricePopupWindow.isShowing()) {
                        PricePopupWindow.dismiss();
                        PricePopupWindow = null;
                        initTabSelect(3);
                    }
                }


                break;
            case R.id.ll_herorank:


                if (RankPopupwindow == null) {


                    if (mPopupWindow != null) {
                        mPopupWindow.dismiss();
                        mPopupWindow = null;
                    } else if (PricePopupWindow != null) {
                        PricePopupWindow.dismiss();
                        PricePopupWindow = null;
                    }
                    initTabSelect(3);


                    final View view = getLayoutInflater(null).inflate(R.layout.allhero_rankpopupwindow, null);
                    btn_new= (Button) view.findViewById(R.id.btn_new);
                    btn_namerank= (Button) view.findViewById(R.id.btn_namerank);
                    RankPopupwindow = new PopupWindow(view, ViewGroup.LayoutParams.MATCH_PARENT
                            , ViewGroup.LayoutParams.MATCH_PARENT, false);
                    RankPopupwindow.showAsDropDown(ll_herorank);
                    ll_herorank.setBackgroundColor(Color.parseColor("#DDDDDD"));
                    btn_new.setOnClickListener(new OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            gridview.setVisibility(View.VISIBLE);
                            ll_notfound.setVisibility(View.GONE);
                            btn_new.setTextColor(Color.parseColor("#f9fbfe"));
                            btn_new.setBackgroundColor(Color.parseColor("#588ef7"));
                            btn_namerank.setTextColor(Color.parseColor("#626468"));
                            btn_namerank.setBackgroundResource(R.drawable.filter_item_b);
                            allheroinfo=new ArrayList<>();
                            allheroinfo  = liumengbaio.lolzhangyoubao.Activity.utils.AllHeroUtils.getAllHerosList(getActivity());
                            allheroadapter = new AllHeroAdapter(allheroinfo, getActivity());
                            gridview.setAdapter(allheroadapter);
                            RankPopupwindow.dismiss();
                            RankPopupwindow =null;
                            tv_rank.setText("排序");
                            initTabSelect(3);
                        }
                    });
                    view.setOnTouchListener(new View.OnTouchListener() {
                        @Override
                        public boolean onTouch(View v, MotionEvent event) {
                            if (RankPopupwindow != null && RankPopupwindow.isShowing()) {

                                RankPopupwindow.dismiss();
                                RankPopupwindow = null;
                                initTabSelect(3);
                            }
                            return false;
                        }
                    });

                    initTabSelect(2);
                } else {
                    if (RankPopupwindow.isShowing()) {
                        RankPopupwindow.dismiss();
                        RankPopupwindow = null;
                        initTabSelect(3);
                    }
                }

                break;
            case R.id.ll_search:
                Intent intent =new Intent(getActivity(), HeroSearchActivity.class);
                startActivity(intent);
            break;
        }
    }


    private void initTabSelect(int posion) {

        switch (posion) {
            case 0://type
                type_icon.setBackgroundResource(R.mipmap.community_arrow_down_p);
                tv_type.setTextColor(Color.parseColor("#FF598EF7"));

                price_icon.setBackgroundResource(R.mipmap.community_arrow_down_d);
                tv_price.setTextColor(Color.parseColor("#b1b1b1"));

                rank_icon.setBackgroundResource(R.mipmap.community_arrow_down_d);
                tv_rank.setTextColor(Color.parseColor("#b1b1b1"));

                break;
            case 1://price
                type_icon.setBackgroundResource(R.mipmap.community_arrow_down_d);
                tv_type.setTextColor(Color.parseColor("#b1b1b1"));

                price_icon.setBackgroundResource(R.mipmap.community_arrow_down_p);
                tv_price.setTextColor(Color.parseColor("#FF598EF7"));

                rank_icon.setBackgroundResource(R.mipmap.community_arrow_down_d);
                tv_rank.setTextColor(Color.parseColor("#b1b1b1"));

                break;
            case 2://rank

                type_icon.setBackgroundResource(R.mipmap.community_arrow_down_d);
                tv_type.setTextColor(Color.parseColor("#b1b1b1"));

                price_icon.setBackgroundResource(R.mipmap.community_arrow_down_d);
                tv_price.setTextColor(Color.parseColor("#b1b1b1"));

                rank_icon.setBackgroundResource(R.mipmap.community_arrow_down_p);
                tv_rank.setTextColor(Color.parseColor("#FF598EF7"));

                break;

            case 3://clear

                type_icon.setBackgroundResource(R.mipmap.community_arrow_down_d);
                tv_type.setTextColor(Color.parseColor("#b1b1b1"));
                ll_herotype.setBackgroundColor(Color.parseColor("#f1f1f2"));

                price_icon.setBackgroundResource(R.mipmap.community_arrow_down_d);
                tv_price.setTextColor(Color.parseColor("#b1b1b1"));
                ll_heroprice.setBackgroundColor(Color.parseColor("#f1f1f2"));

                rank_icon.setBackgroundResource(R.mipmap.community_arrow_down_d);
                tv_rank.setTextColor(Color.parseColor("#b1b1b1"));
                ll_herorank.setBackgroundColor(Color.parseColor("#f1f1f2"));
                break;

        }



    }
    private void initEvent() {
        gridview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                AllHeroInfo info =allheroinfo.get(position);
                FreeHeroInfo infos =new FreeHeroInfo();
                infos.setNickname(info.getNickname());
                infos.setPic_url(info.getPic_url());
                infos.setMoney(info.getMoney());
                infos.setPoint(info.getPoint());
                infos.setId(info.getId());
                infos.setFilter(info.getFilter());
                infos.setName(info.getName());
                infos.setBase_physical(info.getBase_physical());
                infos.setBase_magic(info.getBase_magic());
                infos.setBase_blood(info.getBase_blood());
                infos.setBase_difficulty(info.getBase_difficulty());
                infos.setMoving_speed(info.getMoving_speed());
                infos.setAttack_speed(info.getAttack_speed());
                infos.setRange(info.getRange());
                infos.setAttack(info.getAttack());
                infos.setArmor(info.getArmor());
                infos.setBlood(info.getBlood());
                infos.setMana(info.getMana());
                infos.setMagic_resistance(info.getMagic_resistance());
                infos.setBlood_recovery(info.getBlood_recovery());
                infos.setMagic_recovery(info.getMagic_recovery());
                infos.setUsetip(info.getUsetip());
                infos.setKilltip(info.getKilltip());
                infos.setBg(info.getBg());
                Intent intent =new Intent(getActivity(), HeroDetailsActivity.class);
                intent.putExtra("hero",infos);
                startActivity(intent);
            }
        });
    }


}
